<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:c="http://java.sun.com/jstl/core"
	xmlns:p="http://primefaces.org/ui" lang="pt-br">
<body>

	<ui:composition template="template.xhtml">

		<ui:define name="titulo">
		Area Administrativa
	</ui:define>

		<ui:define name="conteudo">
			<p:dataTable id="categorias" var="item"
				value="#{categoriaController.todos}" style="width: 396px">
				<p:column id="modelHeader">
					<f:facet name="header">  
	                    ID  
	            </f:facet>
					<h:outputText value="#{item.id}" />
				</p:column>

				<p:column>
					<f:facet name="header">  
	                    Categoria  
	            </f:facet>
					<h:outputText value="#{item.catNome}" />
				</p:column>

				<p:column>
					<f:facet name="header">  
	                    Atualizar  
	            </f:facet>
					<p:commandButton id="atualizar" icon="ui-icon-search"
						action="#{categoriaController.editar}" ajax="false" />
				</p:column>

				<p:column>
					<f:facet name="header">  
	                    Excluir  
	            </f:facet>
					<p:commandButton id="excluir" icon="ui-icon-close" title="View"
						action="#{categoriaController.excluir}" ajax="false" />
				</p:column>
			</p:dataTable>

		</ui:define>

	</ui:composition>

</body>
</html>